﻿using Microsoft.Xna.Framework;
using System;

namespace BattleFury.Lib.Extensions
{
    public static class Vector2Extensions
    {
        public static float Distance(this Vector2 p1, Vector2 p2)
        {
            return Vector2.Distance(p1, p2);
        }
        public static float SlopeX(this Vector2 p1, Vector2 p2)
        {
            return (p2.X - p1.X);
        }
        public static float SlopeY(this Vector2 p1, Vector2 p2)
        {
            return (p2.Y - p1.Y);
        }
        public static float Slope(this Vector2 p1, Vector2 p2)
        {
            return p2.SlopeY(p1) / p1.SlopeX(p1);
        }
    }
}
